﻿<mjkTBCtrls:BorderlessMoveableWindow x:Class="MarcelJoachimKloubert.DragNBatch.Windows.MainWindow"
                                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                     xmlns:mjkTBConv="clr-namespace:MarcelJoachimKloubert.CLRToolbox.Windows.Data.Impl;assembly=MarcelJoachimKloubert.CLRToolbox.WPF"
                                     xmlns:mjkTBCtrls="clr-namespace:MarcelJoachimKloubert.CLRToolbox.Windows.Controls;assembly=MarcelJoachimKloubert.CLRToolbox.WPF"
                                     xmlns:locData="clr-namespace:MarcelJoachimKloubert.DragNBatch.Data"
                                     Width="128" Height="128"
                                     AllowDrop="{Binding Path=CanHandleFiles, Mode=OneWay}"
                                     DragEnter="MainWindow_Info_DragEnter"
                                     Drop="MainWindow_Info_Drop">

    <Window.Resources>
        <mjkTBConv:BooleanToVisibilityConverter x:Key="tmBooleanToVisibilityConverter" />
        <locData:PlugInsToMenuItemsValueConverter x:Key="tmPlugInsToMenuItemsValueConverter" />
    </Window.Resources>
    
    <Window.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Select plugin..."
                      ItemsSource="{Binding Path=PlugIns, Mode=OneWay,
                                            Converter={StaticResource tmPlugInsToMenuItemsValueConverter}}" />
        </ContextMenu>
    </Window.ContextMenu>
    
    <Border BorderThickness="1"
            BorderBrush="Black">
        
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Border x:Name="Border_Info"
                    Grid.Row="0"
                    HorizontalAlignment="Stretch"
                    Padding="8"
                    VerticalAlignment="Stretch">

                <TextBlock HorizontalAlignment="Center"
                           TextAlignment="Center"
                           Text="{Binding Path=DropText, Mode=OneWay}"
                           TextWrapping="Wrap"
                           VerticalAlignment="Center" />
            </Border>

            <ProgressBar Grid.Row="1"
                         Height="16px"
                         Minimum="0" Maximum="100"
                         Value="{Binding Path=CurrentStepProgress, Mode=OneWay}"
                         Visibility="{Binding Path=IsRunning, Mode=OneWay,
                                              Converter={StaticResource tmBooleanToVisibilityConverter}}" />

            <ProgressBar Grid.Row="2"
                         Height="16px"
                         Minimum="0" Maximum="100"
                         Value="{Binding Path=OverallProgress, Mode=OneWay}"
                         Visibility="{Binding Path=IsRunning, Mode=OneWay,
                                              Converter={StaticResource tmBooleanToVisibilityConverter}}" />
        </Grid>
    </Border>
</mjkTBCtrls:BorderlessMoveableWindow>